import {insert} from '@/api/order-api.js'
import {Toast} from 'antd-mobile'
import {history} from 'umi'
export default{
    namespace:'order',
    state:{

    },
    reducers:{

    },
    effects:{
        *insertOrder({payload},{put,call}){
            let res=yield call(insert,payload);
            if(res.data.code==200){
                Toast.success('下单成功',2);
                history.push('/buy-info');
            }
        }
    }
}